3.5.64 \(\int \frac {\sec ^3(c+d x)}{(a+b \tan ^2(c+d x))^2} \, dx\) [464]

Optimal. Leaf size=79 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {a-b} d}+\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )} \]

[Out]

1/2*sin(d*x+c)/a/d/(a-(a-b)*sin(d*x+c)^2)+1/2*arctanh(sin(d*x+c)*(a-b)^(1/2)/a^(1/2))/a^(3/2)/d/(a-b)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3757, 205, 214} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} d \sqrt {a-b}}+\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3/(a + b*Tan[c + d*x]^2)^2,x]

[Out]

ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]]/(2*a^(3/2)*Sqrt[a - b]*d) + Sin[c + d*x]/(2*a*d*(a - (a - b)*Sin[c
 + d*x]^2))

Rule 205

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3757

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\sec ^3(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (a-(a-b) x^2\right )^2} \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\sin (c+d x)\right )}{2 a d}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} \sqrt {a-b} d}+\frac {\sin (c+d x)}{2 a d \left (a-(a-b) \sin ^2(c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.17, size = 75, normalized size = 0.95 \begin {gather*} \frac {\frac {\tanh ^{-1}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a-b}}+\frac {\sqrt {a} \sin (c+d x)}{a+(-a+b) \sin ^2(c+d x)}}{2 a^{3/2} d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3/(a + b*Tan[c + d*x]^2)^2,x]

[Out]

(ArcTanh[(Sqrt[a - b]*Sin[c + d*x])/Sqrt[a]]/Sqrt[a - b] + (Sqrt[a]*Sin[c + d*x])/(a + (-a + b)*Sin[c + d*x]^2
))/(2*a^(3/2)*d)

________________________________________________________________________________________

Maple [A]
time = 0.29, size = 80, normalized size = 1.01

method result size
derivativedivides \(\frac {-\frac {\sin \left (d x +c \right )}{2 a \left (a \left (\sin ^{2}\left (d x +c \right )\right )-b \left (\sin ^{2}\left (d x +c \right )\right )-a \right )}+\frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{2 a \sqrt {a \left (a -b \right )}}}{d}\) \(80\)
default \(\frac {-\frac {\sin \left (d x +c \right )}{2 a \left (a \left (\sin ^{2}\left (d x +c \right )\right )-b \left (\sin ^{2}\left (d x +c \right )\right )-a \right )}+\frac {\arctanh \left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{2 a \sqrt {a \left (a -b \right )}}}{d}\) \(80\)
risch \(-\frac {i \left ({\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}\right )}{a d \left (a \,{\mathrm e}^{4 i \left (d x +c \right )}-b \,{\mathrm e}^{4 i \left (d x +c \right )}+2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{\sqrt {a^{2}-a b}}-1\right )}{4 \sqrt {a^{2}-a b}\, d a}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{\sqrt {a^{2}-a b}}-1\right )}{4 \sqrt {a^{2}-a b}\, d a}\) \(192\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3/(a+b*tan(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/2*sin(d*x+c)/a/(a*sin(d*x+c)^2-b*sin(d*x+c)^2-a)+1/2/a/(a*(a-b))^(1/2)*arctanh((a-b)*sin(d*x+c)/(a*(a-
b))^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+b*tan(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is

________________________________________________________________________________________

Fricas [A]
time = 2.90, size = 266, normalized size = 3.37 \begin {gather*} \left [\frac {{\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {a^{2} - a b} \log \left (-\frac {{\left (a - b\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - a b} \sin \left (d x + c\right ) - 2 \, a + b}{{\left (a - b\right )} \cos \left (d x + c\right )^{2} + b}\right ) + 2 \, {\left (a^{2} - a b\right )} \sin \left (d x + c\right )}{4 \, {\left ({\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{3} b - a^{2} b^{2}\right )} d\right )}}, -\frac {{\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + b\right )} \sqrt {-a^{2} + a b} \arctan \left (\frac {\sqrt {-a^{2} + a b} \sin \left (d x + c\right )}{a}\right ) - {\left (a^{2} - a b\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{3} b - a^{2} b^{2}\right )} d\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+b*tan(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

[1/4*(((a - b)*cos(d*x + c)^2 + b)*sqrt(a^2 - a*b)*log(-((a - b)*cos(d*x + c)^2 - 2*sqrt(a^2 - a*b)*sin(d*x +
c) - 2*a + b)/((a - b)*cos(d*x + c)^2 + b)) + 2*(a^2 - a*b)*sin(d*x + c))/((a^4 - 2*a^3*b + a^2*b^2)*d*cos(d*x
 + c)^2 + (a^3*b - a^2*b^2)*d), -1/2*(((a - b)*cos(d*x + c)^2 + b)*sqrt(-a^2 + a*b)*arctan(sqrt(-a^2 + a*b)*si
n(d*x + c)/a) - (a^2 - a*b)*sin(d*x + c))/((a^4 - 2*a^3*b + a^2*b^2)*d*cos(d*x + c)^2 + (a^3*b - a^2*b^2)*d)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{3}{\left (c + d x \right )}}{\left (a + b \tan ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3/(a+b*tan(d*x+c)**2)**2,x)

[Out]

Integral(sec(c + d*x)**3/(a + b*tan(c + d*x)**2)**2, x)

________________________________________________________________________________________

Giac [A]
time = 0.73, size = 91, normalized size = 1.15 \begin {gather*} \frac {\frac {\arctan \left (-\frac {a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )}{\sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} a} - \frac {\sin \left (d x + c\right )}{{\left (a \sin \left (d x + c\right )^{2} - b \sin \left (d x + c\right )^{2} - a\right )} a}}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3/(a+b*tan(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/2*(arctan(-(a*sin(d*x + c) - b*sin(d*x + c))/sqrt(-a^2 + a*b))/(sqrt(-a^2 + a*b)*a) - sin(d*x + c)/((a*sin(d
*x + c)^2 - b*sin(d*x + c)^2 - a)*a))/d

________________________________________________________________________________________

Mupad [B]
time = 12.94, size = 187, normalized size = 2.37 \begin {gather*} \frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{a}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a}}{d\,\left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (4\,b-2\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )}-\frac {\mathrm {atanh}\left (\frac {4\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^{3/2}\,\sqrt {a-b}\,\left (\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a-b}-\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a}+\frac {2}{a}-\frac {2}{a-b}+\frac {4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a\,b-a^2}\right )}\right )}{2\,a^{3/2}\,d\,\sqrt {a-b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^3*(a + b*tan(c + d*x)^2)^2),x)

[Out]

(tan(c/2 + (d*x)/2)^3/a + tan(c/2 + (d*x)/2)/a)/(d*(a - tan(c/2 + (d*x)/2)^2*(2*a - 4*b) + a*tan(c/2 + (d*x)/2
)^4)) - atanh((4*b*tan(c/2 + (d*x)/2))/(a^(3/2)*(a - b)^(1/2)*((2*tan(c/2 + (d*x)/2)^2)/(a - b) - (2*tan(c/2 +
 (d*x)/2)^2)/a + 2/a - 2/(a - b) + (4*b*tan(c/2 + (d*x)/2)^2)/(a*b - a^2))))/(2*a^(3/2)*d*(a - b)^(1/2))

________________________________________________________________________________________